<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>default</title>
</head><body>&nbsp;Launcher 总结:<br/>
&nbsp;<br/>
1、launcher的布局太居中，要想两边拉伸<br/>
&lt;\packages\apps\Launcher2\res\values\dimens.xml&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="apps_customize_pageLayoutPaddingLeft"&gt;40dp&lt;/dimen&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="apps_customize_pageLayoutPaddingRight"&gt;40dp&lt;/dimen&gt;<br/>
apps tab栏的宽度（Launcher2 icon 数目、大小）<br/>
\packages\apps\Launcher2\res\layout-sw720dp\workspace.xml&gt;<br/>
&nbsp; &nbsp; launcher:cellCountX="10"<br/>
&nbsp; &nbsp; launcher:cellCountY="6"<br/>
&nbsp;<br/>
2、或者不想改数目：<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\AppsCustomizeTabHost.java&gt;<br/>
&nbsp; &nbsp; protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mTabs.getLayoutParams().width = contentWidth + 108;<br/>
&nbsp;<br/>
3、workspace、AppsCustomize的cell大小：<br/>
&lt;\packages\apps\Launcher2\res\values-sw600dp\dimens.xml&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="workspace_cell_width"&gt;110dip&lt;/dimen&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="workspace_cell_height"&gt;110dip&lt;/dimen&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &lt;dimen name="apps_customize_cell_width"&gt;110dp&lt;/dimen&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="apps_customize_cell_height"&gt;110dp&lt;/dimen&gt;<br/>
<br/>
4、里面icon的大小：<br/>
&lt;\packages\apps\Launcher2\res\values-sw600dp\dimens.xml&gt;<br/>
&nbsp; &nbsp; &nbsp;&lt;dimen name="app_icon_size"&gt;80dp&lt;/dimen&gt;<br/>
&nbsp;<br/>
5、workspace没有拖动，第二页第一个icon出现在第一页的最右边：<br/>
加大workspace的宽度，或间距：<br/>
workspace的paddingLeft、paddingRight：<br/>
&lt;\packages\apps\Launcher2\res\values-sw600dp-land\dimens.xml&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="workspace_left_padding"&gt;50dip&lt;/dimen&gt;<br/>
&nbsp; &nbsp; &lt;dimen name="workspace_right_padding"&gt;50dip&lt;/dimen&gt;<br/>
&nbsp;<br/>
workspace两屏间距：<br/>
&lt;dimen name="workspace_page_spacing"&gt;100dp&lt;/dimen&gt;<br/>
&nbsp;<br/>
修改workspace的字体大小：<br/>
如果没有就添加：<br/>
&lt;\packages\apps\Launcher2\res\values-sw480dp\styles.xml&gt;<br/>
&nbsp; &nbsp; &lt;style name="WorkspaceIcon.Landscape"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item name="android:textSize"&gt;13sp&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/style&gt;<br/>
&nbsp;<br/>
6、加wallpaper：<br/>
1.&lt;\packages\apps\Launcher2\res\values-sw600dp\wallpapers.xml&gt;<br/>
&nbsp; &nbsp;加wallpaper的名字<br/>
2.&lt;\packages\apps\Launcher2\res\drawable-nodpi&gt;<br/>
&nbsp; &nbsp;加如wallpaper <br/>
&nbsp;<br/>
7、gallery的widget默认添加到workspace上：<br/>
&lt;\packages\apps\Launcher2\res\xml\default_workspace.xml&gt;<br/>
&nbsp; &nbsp; &lt;!-- Middle screen [2] --&gt;<br/>
&nbsp; &nbsp; &lt;appwidget<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.android.gallery3d"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.android.gallery3d.gadget.PhotoAppWidgetProvider"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:x="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:y="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:spanX="3"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:spanY="3" /&gt;<br/>
&nbsp;<br/>
&lt;\packages\apps\Gallery2\src\com\android\gallery3d\gadget\PhotoAppWidgetProvider.java&gt;<br/>
&nbsp; &nbsp; @Override<br/>
&nbsp; &nbsp; public void onUpdate(Context context, &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int id : appWidgetIds) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(id == 2){ <br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; helper.setWidget(id,WidgetDatabaseHelper.TYPE_SHUFFLE, null); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; <br/>
&nbsp; &nbsp; }<br/>
&nbsp;<br/>
8、在桌面上添加网页的快捷方式：<br/>
&lt;\packages\apps\Launcher2\res\xml\default_workspace.xml&gt; <br/>
&nbsp; &nbsp; &lt;shortcut<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:title="@string/application_name"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:icon="@drawable/ic_no_applications"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:uri="http://www.aaa.com"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:y="3" /&gt;<br/>
&nbsp;<br/>
9、在桌面上默认放文件夹：<br/>
&lt;\packages\apps\Launcher2\res\xml\default_workspace.xml&gt;<br/>
&nbsp; &nbsp; &nbsp;&lt;folder<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:x="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:y="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:title = "@string/application_name" &gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp;&lt;favorite<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.android.deskclock.DeskClock"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.android.deskclock"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:container="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:y="0" /&gt;<br/>
<br/>
&nbsp; &nbsp; &nbsp;&lt;favorite<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.android.calculator2.Calculator"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.android.calculator2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:container="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:y="0" /&gt;<br/>
&nbsp; &nbsp; <br/>
&nbsp; &nbsp; &nbsp;&lt;/folder&gt; &nbsp; &nbsp;<br/>
&nbsp;<br/>
10、桌面上添加快捷方式，点击播放视频：<br/>
&lt;\packages\apps\Launcher2\res\xml-sw720dp\default_workspace.xml&gt;<br/>
&nbsp;&lt;shortcut launcher:title="@string/application_name" <br/>
launcher:icon="@drawable/ic_launcher_application" <br/>
launcher:uri="file:///mnt/sdcard/external_sdcard/1...playermenu;end" <br/>
launcher:screen="2" <br/>
&nbsp; &nbsp;launcher:x="1" <br/>
launcher:y="1" /&gt;<br/>
&nbsp;<br/>
11、安装apk，显示隐藏的google play：<br/>
1.写google显示的apk:<br/>
GooglePlayShow的activity：<br/>
&nbsp; &nbsp; &nbsp; &nbsp; ComponentName componentname = new ComponentName("com.android.vending", "com.android.vending.AssetBrowserActivity");<br/>
&nbsp; &nbsp; &nbsp; &nbsp; packagemanager.setComponentEnabledSetting(componentname, 1, 1);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; componentname = new ComponentName("com.example.googleplayshow", "com.example.googleplayshow.MainActivity");<br/>
&nbsp; &nbsp; &nbsp; &nbsp; packagemanager.setComponentEnabledSetting(componentname, 2, 1);<br/>
&nbsp;<br/>
2.&lt;\packages\apps\Launcher2\src\com\android\launcher2\LauncherModel.java&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else if (Intent.ACTION_PACKAGE_ADDED.equals(action)) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!replacing) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(packageName.equals("com.example.googleplayshow")){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context.startActivity(new Intent().setComponent(new ComponentName("com.example.googleplayshow", "com.example.googleplayshow.MainActivity")).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op = PackageUpdatedTask.OP_ADD;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; op = PackageUpdatedTask.OP_UPDATE;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp;<br/>
隐藏google search：<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\Launcher.java&gt;<br/>
&nbsp; &nbsp; private void setupViews() {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; mSearchDropTargetBar = (SearchDropTargetBar) mDragLayer.findViewById(R.id.qsb_bar);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; mSearchDropTargetBar.hideSearchBar(false);<br/>
&nbsp;<br/>
&nbsp; &nbsp; void showWorkspace(boolean animated, Runnable onCompleteRunnable) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; //mSearchDropTargetBar.showSearchBar(wasInSpringLoadedMode);<br/>
&nbsp;<br/>
12、widget中隐藏google play：<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\AppsCustomizePagedView.java&gt;<br/>
updatePackages里面添加：<br/>
if(!widget.provider.getPackageName().equals("com.android.vending") &amp;&amp; !widget.provider.getPackageName().equals("com.android.vending.MarketWidgetProvider")){<br/>
&nbsp; &nbsp; mWidgets.add(widget);<br/>
}<br/>
&nbsp;<br/>
13、clock的widget下部分显示不全，向上调<br/>
&lt;\packages\amlogic\Launcher2\res\values\dimens.xml&gt;<br/>
&lt;dimen name="app_widget_preview_padding_top"&gt;10dp&lt;/dimen&gt;<br/>
&nbsp;<br/>
修改widget的text的size：<br/>
&lt;\packages\amlogic\Launcher2\res\layout\apps_customize_widget.xml&gt;<br/>
&nbsp; &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"<br/>
&nbsp; &nbsp; &nbsp;android:id="@+id/widget_name"<br/>
&nbsp; &nbsp; &nbsp;android:textSize="20sp" /&gt;<br/>
&nbsp;<br/>
14、launcher中隐藏一个app：<br/>
需要该app的packageName，例如要隐藏settings：<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\LauncherModel.java&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; private void loadAllAppsByBatch() { <br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; apps = packageManager.queryIntentActivities(mainIntent, 0); <br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ResolveInfo removeApp = null;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(ResolveInfo info:apps){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(info.activityInfo.packageName.equals("com.android.settings")){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; removeApp = info;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(removeApp != null){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; apps.remove(removeApp);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp;<br/>
15、launcher中隐藏多个app： 红色为改动部分<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\LauncherModel.java&gt;<br/>
&nbsp; &nbsp; &nbsp; private void loadAllAppsByBatch() { &nbsp;<br/>
&nbsp; &nbsp;final PackageManager packageManager = mContext.getPackageManager();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;ResolveInfo&gt; apps = new ArrayList&lt;ResolveInfo&gt;();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List&lt;ResolveInfo&gt; allApps = null;<br/>
&nbsp;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int N = Integer.MAX_VALUE;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int startIndex;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int i=0;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int batchSize = -1;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while (i &lt; N &amp;&amp; !mStopped) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i == 0) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mAllAppsList.clear();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; final long qiaTime = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; allApps = packageManager.queryIntentActivities(mainIntent, 0);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(ResolveInfo info : allApps){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(info.activityInfo != null <br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; !info.activityInfo.packageName.equalsIgnoreCase("com.android.email")<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; !info.activityInfo.packageName.equalsIgnoreCase("com.android.providers.downloads.ui")<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp;&amp; !info.activityInfo.packageName.equalsIgnoreCase("com.adobe.flashplayer")){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; apps.add(info);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
<br/>
settings 问题总结:<br/>
1.入口，设置分屏显示<br/>
frameworks\base\core\res\res\values\bools.xml 下的 preferences_prefer_dual_pane 为true.<br/>
&lt;bool name="preferences_prefer_dual_pane"&gt;true&lt;/bool&gt;<br/>
&nbsp;<br/>
2.top level headers--这里可以去掉左边的headers<br/>
&lt;settings.java&gt;<br/>
private void updateHeaderList(List&lt;Header&gt; target) {<br/>
if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)) {<br/>
&nbsp; &nbsp;target.remove(header);<br/>
}<br/>
&nbsp;<br/>
3.默认字体：<br/>
public void readFontSizePreference(ListPreference pref) {<br/>
&nbsp; &nbsp; &nbsp;ActivityManagerNative.getDefault().getConfiguration()<br/>
&nbsp;<br/>
系统的Configuration是从ActivityManagerService设置的：<br/>
&nbsp;<br/>
&lt;\frameworks\base\services\java\com\android\server\am\ActivityManagerService.java&gt;<br/>
mConfiguration.setToDefaults();<br/>
fontScale = Float.parseFloat(SystemProperties.get("ro.fontScale","1"));<br/>
&nbsp;<br/>
4.settings的theme:<br/>
&lt;\packages\apps\Settings\AndroidManifest.xml&gt;<br/>
&nbsp; &nbsp; &lt;application android:label="@string/settings_label"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:icon="@mipmap/ic_launcher_settings"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:taskAffinity=""<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:theme="@android:style/Theme.Holo"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:uiOptions="splitActionBarWhenNarrow"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:hardwareAccelerated="true"&gt;<br/>
&nbsp;<br/>
&lt;\frameworks\base\core\res\res\values\themes.xml&gt;<br/>
&lt;style name="Theme.Holo"&gt;<br/>
字体颜色<br/>
&lt;item name="textColorPrimary"&gt;@android:color/primary_text_holo_dark&lt;/item&gt;<br/>
加亮框的颜色：<br/>
&lt;item name="activatedBackgroundIndicator"&gt;@android:drawable/activated_background_holo_dark&lt;/item&gt;<br/>
触摸框的颜色：<br/>
&lt;item name="listChoiceBackgroundIndicator"&gt;@android:drawable/list_selector_holo_dark&lt;/item&gt;<br/>
左边背景：<br/>
&lt;item name="windowBackground"&gt;@android:drawable/screen_background_selector_dark&lt;/item&gt;<br/>
右边的背景：<br/>
&lt;item name="detailsElementBackground"&gt;@android:drawable/panel_bg_holo_dark&lt;/item&gt;<br/>
title的背景：<br/>
&lt;item name="actionBarStyle"&gt;@android:style/Widget.Holo.ActionBar&lt;/item&gt;<br/>
&nbsp;<br/>
5.设置--》开发者选项--修改后台进程限制<br/>
&nbsp;<br/>
frameworks/base/services/java/com/android/server$ vi ./am/ActivityManagerService.java<br/>
大概839行 把int mProcessLimitOverride = -1;改成4(不得超过4个进程)<br/>
标准限制 对应 -1<br/>
不允许后台进程 对应 0<br/>
不得超过1个进程 对应 1<br/>
不得超过2个进程 &nbsp;对应 2<br/>
不得超过3个进程 对应 3<br/>
&nbsp;<br/>
6. 默认不要锁屏，设置-安全--屏幕锁定 (无)<br/>
overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml<br/>
&nbsp;&lt;bool name="def_lockscreen_disabled"&gt;true&lt;/bool&gt;<br/>
&nbsp;<br/>
7. 位置服务--- 默认Google的位置服务为勾选<br/>
overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml<br/>
&lt;string name="def_location_providers_allowed" translatable="false"&gt;gps&lt;/string&gt;<br/>
改成<br/>
&lt;string name="def_location_providers_allowed" translatable="false"&gt;gps,network&lt;/string&gt;<br/>
<br/>
常用修改<br/>
一. 修改默认(Settting.apk 中选项默认值一般存在于 frameworks\base\packages\SettingsProvider\res\values\defaults.xml)<br/>
1. 默认勾选 未知来源<br/>
&lt;bool name="def_install_non_market_apps"&gt;false&lt;/bool&gt; <br/>
<br/>
2. 默认铃声, 通知, 闹钟 音乐<br/>
可以在system.prop 分别配置<br/>
ro.config.ringtone=Playa.ogg （默认铃声设置，文件在/system/media/audio/ringtones 把喜欢的铃声放这里，比如123.MP3放入ringtones文件夹中，这里代码改为ro.config.ringtone=123.mp3）<br/>
ro.config.notification_sound=regulus.ogg （默认提示音，文件在/system/media/audio/notifications 修改方法同上）<br/>
ro.config.alarm_alert=Alarm_Beep_03.ogg （默认闹铃，文件在/system/media/audio/alarms 修改方法同上）<br/>
<br/>
3. 壁纸不跟随滑动<br/>
packages/apps/Launcher2/./src/com/android/launcher2/Workspace.java &nbsp;大概 875行<br/>
private float wallpaperOffsetForCurrentScroll() <br/>
修改 wallpaperOffsetForCurrentScroll 的返回值。 改成 return &nbsp;0.5f; <br/>
<br/>
二.隐藏或删除某项<br/>
1.去掉设置中Wifi选项<br/>
device/amlogic/xxxref/xxxref.mk 文件中<br/>
# Device specific system feature description<br/>
PRODUCT_COPY_FILES += \<br/>
$(LOCAL_PATH)/tablet_core_hardware.xml:system/etc/permissions/tablet_core_hardware.xml \<br/>
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ (删除)<br/>
<br/>
2.去掉设置中蓝牙选项<br/>
参考 wifi。<br/>
在 tablet_core_hardware.xml &nbsp;删除 &lt;feature name="android.hardware.bluetooth" /&gt; &nbsp; &nbsp;这一行<br/>
<br/>
3. HDMI 部分<br/>
1）去掉HDMI选项 &nbsp;在system.prop中 加入 ro.hdmi.autoswitch=false<br/>
2）去掉480p 选项 在prop中设置 ro.hdmi480p.enable=false<br/>
<br/>
4. 去掉 powerwidget 中 某一项<br/>
以去掉 gps 为例<br/>
在 packages\apps\Settings\res\layout\widget.xml 下， 移除<br/>
&nbsp;&lt;ImageView<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_width="1dip"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:background="@drawable/appwidget_settings_divider_holo"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:contentDescription="@null"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; /&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &lt;LinearLayout<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:id="@+id/btn_bluetooth"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_width="0dip"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_weight="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:paddingTop="12dp"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:background="@drawable/appwidget_button_center"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:clickable="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:focusable="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:orientation="vertical"&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;ImageView<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:id="@+id/img_bluetooth"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_width="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="0dip"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_weight="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:scaleType="center"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:contentDescription="@null"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;ImageView<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:id="@+id/ind_bluetooth"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_width="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="wrap_content"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:scaleType="fitXY"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:contentDescription="@null"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &lt;/LinearLayout&gt;<br/>
然后 com.android.settings.widget.SettingsAppWidgetProvider.java <br/>
注释 views.setOnClickPendingIntent(R.id.btn_gps, getLaunchPendingIntent(context, BUTTON_GPS)); 这一行。<br/>
<br/>
5. &nbsp;去掉 Setting widget 中 某一项<br/>
以去掉 "网络共享与便携式热点" 为例<br/>
根据"网络共享与便携式热点" 这个关键词 在 values-zh_rCN 中搜索 到的 key值， 然后在AndroidManifest.xml 搜索这个 key值。 找到对于的Activity 配置<br/>
移除 &lt;category android:name="com.android.settings.SHORTCUT" /&gt; &nbsp;这一行。<br/>
<br/>
6. 修改浏览器默认浏览器模式<br/>
packages\apps\Browser\res\xml-sw600dp\advanced_preferences.xml<br/>
&nbsp;&lt;ListPreference<br/>
&nbsp; &nbsp; &nbsp; &nbsp;android:key="user_agent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp;android:title="@string/pref_development_uastring"<br/>
&nbsp; &nbsp; &nbsp; &nbsp;android:entries="@array/pref_development_ua_choices"<br/>
&nbsp; &nbsp; &nbsp; &nbsp;android:entryValues="@array/pref_development_ua_values"<br/>
&nbsp; &nbsp; &nbsp; &nbsp;android:defaultValue="3"/&gt;<br/>
&nbsp; &nbsp;修改 android:defaultValue="3" 具体的值参考一下选项<br/>
&nbsp; &lt;string-array name="pref_development_ua_choices" translatable="false"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Android&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Desktop&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;iPhone&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;iPad&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Froyo-N1&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Honeycomb-Xoom&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/string-array&gt;<br/>
&nbsp; &nbsp; &lt;!-- Do not tranlsate. &nbsp;Development option --&gt;<br/>
&nbsp; &nbsp; &lt;string-array name="pref_development_ua_values" translatable="false"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;0&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;1&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;2&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;3&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;4&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;5&lt;/item&gt;<br/>
&nbsp;<br/>
&nbsp;<br/>
7. workspace 预置 文件夹 <br/>
范例<br/>
folder 放到最前面。launcher:container 的值是folder的数据库中的id。一般从1开始。<br/>
&lt;folder<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:x="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:y="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:title ="@string/application_name" &gt;<br/>
&nbsp; <br/>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;favorite<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.android.settings"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.android.settings.Settings"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:container="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:y="0" /&gt;<br/>
&nbsp; <br/>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;favorite<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.fb.FileBrower"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.fb.FileBrower.FileBrower"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:container="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launcher:y="0" /&gt;<br/>
&nbsp; &nbsp; &lt;/folder&gt;<br/>
&nbsp;<br/>
&nbsp;<br/>
widget 范例<br/>
&lt;appwidget<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.android.calendar"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.android.calendar.widget.CalendarAppWidgetProvider"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:y="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:spanX="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:spanY="3" /&gt;<br/>
&nbsp;<br/>
快捷方式范例<br/>
&lt;favorite<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:packageName="com.android.settings"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:className="com.android.settings.Settings"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="2"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:x="1"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:y="3" /&gt;<br/>
&nbsp;<br/>
&nbsp;<br/>
网页快捷方式<br/>
&lt;shortcut<br/>
launcher:title="@string/custom_google"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:icon="@drawable/favicon_google"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:uri="http://www.google.com/"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="3"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:x="4"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:y="1"/&gt;<br/>
<br/>
8. 系统自带LatinIME 高级设置--按键音量设置 &nbsp; 修改默认值<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; java/res/values/keypress-volumes.xml<br/>
&nbsp;<br/>
&lt;string-array name="keypress_volumes" translatable="false"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;!-- Build.HARDWARE,volume --&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;amlogic,0.3&lt;/item&gt; &nbsp; &nbsp;//加入这行。 把0.3改成自己的默认值。0.3代表30%<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;herring,0.5&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;tuna,0.5&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;stingray,0.4&lt;/item&gt;<br/>
&nbsp;<br/>
9.lockscreen坐标数字时钟被遮住<br/>
&nbsp;<br/>
请调整红色的数字：<br/>
&nbsp;<br/>
&lt;\frameworks\base\core\res\res\layout-sw600dp\keyguard_screen_tab_unlock_land.xml&gt;<br/>
&nbsp; &lt;!-- left side: status and music --&gt;<br/>
&nbsp; &nbsp; &lt;RelativeLayout<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_weight="0.5"<br/>
&nbsp;<br/>
&nbsp; &nbsp; &lt;!-- right side --&gt;<br/>
&nbsp; &nbsp; &lt;RelativeLayout<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_weight="0.5"<br/>
&nbsp;<br/>
10.在4.1上修改默认字体大小：<br/>
&nbsp; 比如改成大：<br/>
&nbsp; &lt;frameworks\base\packages\SettingsProvider\res\values\defaults.xml&gt;<br/>
&lt;fraction name="def_font_scale"&gt;115%&lt;/fraction&gt;<br/>
&nbsp;<br/>
11.没有蓝牙的平台，去掉窗口小部件－设置快捷方式－拉到桌面显示的“蓝牙”选项<br/>
&lt;\packages\apps\Settings\src\com\android\settings\OutputSettingsBroadcastReceiver.java&gt;<br/>
public void onReceive(Context context, Intent intent) <br/>
{<br/>
// boot completed<br/>
if(intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED))<br/>
{<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!context.getPackageManager().hasSystemFeature(context.getPackageManager().FEATURE_BLUETOOTH)){<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ComponentName componentname = new ComponentName("com.android.settings", "com.android.settings.Settings$BluetoothSettingsActivity");<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; context.getPackageManager().setComponentEnabledSetting(componentname, 2, 1);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br/>
}<br/>
&nbsp;<br/>
11. 修改 浏览器的默认标签<br/>
分别在一下资源文件中添加自定义的标签<br/>
packages\apps\Browser\res\values\strings.xml<br/>
&lt;string-array name="bookmarks" translatable="false"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Google&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.google.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Picasa&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://picasaweb.google.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Yahoo!&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.yahoo.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;MSN&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.msn.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Twitter&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://twitter.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Facebook&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.facebook.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Wikipedia&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.wikipedia.org/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;eBay&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.ebay.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;CNN&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.cnn.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;NY Times&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.nytimes.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;ESPN&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://espn.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Amazon&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.amazon.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;Weather Channel&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.weather.com/&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;BBC&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;http://www.bbc.co.uk/&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/string-array&gt;<br/>
&nbsp;<br/>
packages\apps\Browser\res\values\bookmarks_icons.xml ，<br/>
注意：这里每个网站对应一个缩略图和一个favicon<br/>
&lt;array name="bookmark_preloads"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_google&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_google&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_picasa&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_picasa&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_yahoo&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_yahoo&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_msn&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_msn&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_twitter&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_twitter&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_facebook&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_facebook&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_wikipedia&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_wikipedia&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_ebay&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_ebay&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_cnn&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_cnn&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_nytimes&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_nytimes&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_espn&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_espn&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_amazon&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_amazon&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_weatherchannel&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_weatherchannel&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/favicon_bbc&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@raw/thumb_bbc&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/array&gt;<br/>
对应的图片在 packages\apps\Browser\res\raw<br/>
&nbsp;<br/>
&nbsp;<br/>
12. 锁屏界面， 解锁组件增加图标<br/>
已增加 VideoPlayer 为例，<br/>
在frameworks/base/core/res/res/drawable-hdpi &nbsp;下面<br/>
添加一个对应的png图标<br/>
下面红色为增加的部分。<br/>
frameworks/core/res/res/values-sw600dp-land/arrays.xml <br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_lockscreen_unlock&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_action_assist_generic&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_lockscreen_camera&lt;/item&gt;<br/>
&nbsp;- &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@null&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_lockscreen_videoplayer&lt;/item&gt; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;/array&gt;<br/>
&nbsp;<br/>
&nbsp;&lt;array name="lockscreen_target_descriptions_with_camera"&gt;<br/>
frameworks/base/res/res/values/arrays.xml b/core/res/res/values/arrays.xml<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_lockscreen_unlock&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_action_assist_generic&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_lockscreen_camera&lt;/item&gt;<br/>
- &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@null&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@drawable/ic_lockscreen_videoplayer&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp;&lt;/array&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp;&lt;array name="lockscreen_target_descriptions_with_camera"&gt;<br/>
frameworks/base/res/res/values/public.xml b/core/res/res/values/public.xml<br/>
&nbsp;<br/>
index ac0a457..be4257e 100755<br/>
--- a/core/res/res/values/public.xml<br/>
+++ b/core/res/res/values/public.xml<br/>
&nbsp;<br/>
&nbsp; &nbsp;&lt;java-symbol type="drawable" name="ic_lockscreen_unlock_phantom" /&gt;<br/>
&nbsp; &nbsp;&lt;java-symbol type="drawable" name="ic_media_route_on_holo_dark" /&gt;<br/>
&nbsp; &nbsp;&lt;java-symbol type="drawable" name="ic_media_route_disabled_holo_dark" /&gt;<br/>
&nbsp;<br/>
&nbsp; &lt;java-symbol type="drawable" name="ic_lockscreen_videoplayer" /&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp;&lt;java-symbol type="layout" name="action_bar_home" /&gt;<br/>
&nbsp; &nbsp;&lt;java-symbol type="layout" name="action_bar_title_item" /&gt;<br/>
&nbsp; &nbsp;&lt;java-symbol type="layout" name="action_menu_item_layout" /&gt;<br/>
&nbsp;<br/>
frameworks/base/policy/src/com/android/internal/policy/impl/LockScreen.java <br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case com.android.internal.R.drawable.ic_lockscreen_camera:<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;launchActivity(new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA));<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mCallback.pokeWakelock();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case com.android.internal.R.drawable.ic_lockscreen_videoplayer:<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;launchActivity(new Intent().setClassName("com.farcore.videoplayer", "com.farcore.videoplayer.FileList"));<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mCallback.pokeWakelock();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;<br/>
注意： 在 frameworks/base/core/res/ 中执行mm 。然后在frameworks/base/policy 中执行mm。看看能否编译过。不行的话，在 在根目录下 执行make update-api <br/>
&nbsp;<br/>
13. 休眠策略<br/>
修改默认的休眠策略，请参考<br/>
frameworks\base\packages\SettingsProvider\res\values\defaults.xml<br/>
&lt;integer name="def_wifi_sleep_policy"&gt;0&lt;/integer&gt;<br/>
&lt;!-- &nbsp;0 == Never, 1 == Only when plugged in,2 == Always. --&gt; &nbsp; <br/>
&nbsp; <br/>
14. Launcher 半透明<br/>
4.0， 4.1 &nbsp;下载附件中的patch集合--- translucent.zip<br/>
如果是 4.2.2系统 ， 还需修改<br/>
Launcher/src/com/android/launcher2/Launcher.java<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mLauncherView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mWorkspaceBackgroundDrawable = getResources().getDrawable(R.drawable.workspace_bg);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mBlackBackgroundDrawable = new ColorDrawable(Color.BLACK); // 修改为 mBlackBackgroundDrawable = new ColorDrawable(0x7f000000); &nbsp; &nbsp;<br/>
&nbsp; packages\amlogic\Launcher2\src\com\android\launcher2\Launcher.java<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mStateAnimation.addListener(new AnimatorListenerAdapter() {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; boolean animationCancelled = false;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @Override<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; public void onAnimationStart(Animator animation) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchOnLauncherTransitionEnd(fromView, animated, false); //add<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dispatchOnLauncherTransitionEnd(toView, animated, false); &nbsp; //add<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updateWallpaperVisibility(false); &nbsp;//true 改成false<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Prepare the position<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; toView.setTranslationX(0.0f);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; toView.setTranslationY(0.0f);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; toView.setVisibility(View.VISIBLE);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; toView.bringToFront();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
<br/>
15. APK 预装时无法找到lib库的问题<br/>
&nbsp;<br/>
&nbsp; &nbsp; (1) 如果log报错是找不到lib库首先可以修改lib的路径<br/>
&nbsp;<br/>
jb4.1\frameworks\base\core\java\android\app\NativeActivity.java<br/>
<br/>
&nbsp; &nbsp; &nbsp;public static final String SYSTEM_LIB_PATH = "/system/lib";<br/>
&nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (libraryFile.exists()) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path = libraryFile.getPath();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; File systemLibraryFile = new File(SYSTEM_LIB_PATH,System.mapLibraryName(libname)); &nbsp; <br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (systemLibraryFile.exists()) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; path = systemLibraryFile.getPath();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp;<br/>
<br/>
&nbsp;<br/>
(2)apk本身会检测检测/data/data/lib路径是否存在资源文件时方法1不适用，用第二种方法： &nbsp;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;在项目上的mk文件 /device/amlogic/g18refg/8ref.mk 中,加上 preinstallation<br/>
&nbsp;<br/>
PRODUCT_PACKAGES += \<br/>
lights.amlogic \<br/>
FileBrowser \<br/>
AppInstaller \<br/>
VideoPlayer \<br/>
HdmiSwitch \<br/>
Update \<br/>
fw_env \<br/>
preinstallation<br/>
&nbsp;<br/>
将网页底部的附件 Preinstallation.zip拷贝到packages\amlogic下面解压 &nbsp; 将需要预装安装的apk拷贝到preinstallation目录下面，编辑里面的preinstall.sh文件内容如下：<br/>
&nbsp;<br/>
#!/system/xbin/busybox sh<br/>
&nbsp;<br/>
echo "do preinstall applications"<br/>
&nbsp;<br/>
# com.mxtech.videoplayer.ad apk包名<br/>
&nbsp;<br/>
if [ ! -e /data/data/com.mxtech.videoplayer.ad/ ]; then<br/>
&nbsp; pm install /system/preinstall/com.mxtech.videoplayer.ad.50.apk<br/>
fi<br/>
&nbsp;<br/>
if [ ! -e /data/data/org.xbmc.xbmc/ ]; then<br/>
&nbsp; pm install /system/preinstall/xbmc-20130414-e2c3799-Frodo-armeabi-v7a.apk<br/>
fi<br/>
。。。。。。<br/>
&nbsp;<br/>
然后在device\amlogic\common\init\tablet\init.amlogic.rc 中,启动预安装脚本的服务.<br/>
&nbsp;<br/>
MX:<br/>
service preinstall /system/bin/preinstall.sh<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;class main<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;user root<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;group root<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oneshot<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;console<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;disabled &nbsp; &nbsp; <br/>
&nbsp;<br/>
&nbsp;<br/>
M3:<br/>
service preinstall /system/bin/preinstall.sh<br/>
user root<br/>
&nbsp; &nbsp; &nbsp; &nbsp; group root<br/>
&nbsp; &nbsp; &nbsp; &nbsp; disabled<br/>
&nbsp; &nbsp; &nbsp; &nbsp; oneshot<br/>
&nbsp;<br/>
在init.amlogic.rc最后一行加上<br/>
&nbsp;<br/>
start preinstall<br/>
&nbsp;<br/>
&nbsp;<br/>
16. 去掉 hotspot<br/>
把红色的部分删掉<br/>
device\amlogic\gXXXX\overlay\frameworks\base\core\res\res\values\config.xml<br/>
&nbsp; &nbsp; &lt;string-array translatable="false" name="config_tether_wifi_regexs"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;"wlap0"&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;"wl0.1"&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;"wlan0"&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/string-array&gt;<br/>
&nbsp; &nbsp; &lt;integer-array translatable="false" name="config_tether_upstream_types"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;0&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;9&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/integer-array&gt;<br/>
&nbsp;<br/>
17.桌面上添加快捷方式，点击播放视频：<br/>
&lt;\packages\apps\Launcher2\res\xml-sw720dp\default_workspace.xml&gt;<br/>
&nbsp;&lt;shortcut<br/>
launcher:title="@string/application_name"<br/>
launcher:icon="@drawable/ic_launcher_application" launcher:uri="file:///mnt/sdcard/external_sdcard/1...playermenu;end"<br/>
launcher:screen="2" launcher:x="1" launcher:y="1" /&gt;<br/>
&nbsp;<br/>
添加网页的快捷方式：<br/>
&lt;\packages\apps\Launcher2\res\xml-sw720dp\default_workspace.xml&gt; <br/>
&nbsp; &nbsp; &lt;shortcut<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:title="@string/application_name"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:icon="@drawable/ic_no_applications"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:uri="http://www.aaa.com"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:screen="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:x="0"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; launcher:y="3" /&gt;<br/>
&nbsp;<br/>
18.去掉camera的全景icon：<br/>
4.1：<br/>
&lt;\packages\apps\Camera\res\layout-sw600dp-land\mode_picker.xml&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;com.android.camera.ui.RotateImageView android:id="@+id/mode_panorama"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:contentDescription="@string/accessibility_switch_to_panorama"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_width="match_parent"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="wrap_content"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:layout_weight="1"<br/>
android:visibility="gone"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:scaleType="center"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:background="@drawable/bg_pressed"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; android:src="@drawable/ic_switch_pan_holo_light" /&gt;<br/>
&nbsp;<br/>
4.2：<br/>
&lt;\packages\apps\Camera\src\com\android\camera\CameraActivity.java&gt;<br/>
加上红色加亮的地方：<br/>
&nbsp; &nbsp; public void init() {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; mDrawables.length; i++) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ((i == LIGHTCYCLE_MODULE_INDEX &amp;&amp; !LightCycleHelper.hasLightCycleCapture(this))||i == PANORAMA_MODULE_INDEX) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue; // not enabled, so don't add to UI<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; drawids[ix++] = DRAW_IDS[i];<br/>
&nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp;<br/>
&lt;\packages\apps\Camera\src\com\android\camera\CameraActivity.java&gt;<br/>
&nbsp; &nbsp; public void init() {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; int[] drawids = new int[LightCycleHelper.hasLightCycleCapture(this)<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ? DRAW_IDS.length -1 : DRAW_IDS.length - 2];<br/>
&nbsp;<br/>
19.锁屏左边clock太大显示不全：<br/>
&lt;\frameworks\base\core\res\res\layout-sw600dp\keyguard_screen_status_land.xml&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;TextView android:id="@+id/timeDisplayBackground"<br/>
android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"<br/>
&nbsp;<br/>
&lt;TextView android:id="@+id/timeDisplayForeground"<br/>
android:textSize="@dimen/keyguard_pattern_unlock_clock_font_size"<br/>
&nbsp;<br/>
//dimens.xml里的keyguard_pattern_unlock_clock_font_size调小<br/>
&nbsp;<br/>
可以把clock调成居中显示，不要靠右，造成右边显示不全<br/>
&lt;LinearLayout<br/>
&nbsp; &nbsp; &nbsp; &nbsp; xmlns:android="http://schemas.android.com/apk/res/android"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:orientation="vertical"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_width="wrap_content"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:layout_height="wrap_content"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:gravity="right"&gt;<br/>
//改成center<br/>
&nbsp;<br/>
20. 去掉settings的battery里面的mobile network signal显示<br/>
加上红色语句：<br/>
&lt;\packages\apps\Settings\src\com\android\settings\fuelgauge\BatteryHistoryChart.java&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; if (!com.android.settings.Utils.isWifiOnly(getContext())) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mHavePhoneSignal = true;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; mHavePhoneSignal = false; &nbsp; &nbsp; &nbsp;<br/>
&nbsp;<br/>
21. 去掉待机的CRT动画<br/>
把自己项目overlay中的<br/>
frameworks/base/core/res/res/values/config.xml<br/>
&lt;bool name="config_animateScreenLights"&gt;false&lt;/bool&gt; 删掉 就可以了<br/>
<br/>
22. 添加格式化内部sdcard<br/>
jb4.1\packages\amlogic\Settings\src\com\android\settings\deviceinfo\StorageVolumePreferenceCategory.java<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp;public StorageVolumePreferenceCategory(Context context, Resources resources, StorageVolume storageVolume, StorageManager storageManager, boolean isPrimary) {<br/>
// Cannot format emulated storage<br/>
&nbsp; &nbsp; &nbsp; &nbsp; mAllowFormat = mStorageVolume != null &amp;&amp; !mStorageVolume.isEmulated()&amp;&amp;mStorageVolume.isRemovable();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; // For now we are disabling reformatting secondary external storage<br/>
&nbsp; &nbsp; &nbsp; &nbsp; // until some interoperability problems with MTP are fixed<br/>
&nbsp; &nbsp; &nbsp; &nbsp; //if (!isPrimary) mAllowFormat = false;<br/>
&nbsp; &nbsp; &nbsp; <br/>
+ &nbsp; &nbsp; &nbsp; &nbsp;if(mStorageVolume != null &amp;&amp; mStorageVolume.getPath().equals("/storage/sdcard0")){<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mAllowFormat = true;<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp;}<br/>
&nbsp;<br/>
23. 4.2 LockScreen 任何方向都可以解锁， 修改成只有向右才能解锁<br/>
4.2 Lockscreen 对应的java 文件不再是 Lockscreen, 而是KeyguardSelectorView.java<br/>
&nbsp;<br/>
frameworks/base/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp;&lt;array name="lockscreen_targets_unlock_only"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@*android:drawable/ic_lockscreen_unlock&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &lt;item&gt;@null&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &lt;item&gt;@null&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &lt;item&gt;@null&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp;&lt;/array&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &nbsp;&lt;array name="lockscreen_target_descriptions_unlock_only"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;item&gt;@*android:string/description_target_unlock&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &lt;item&gt;@null&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &lt;item&gt;@null&lt;/item&gt;<br/>
+ &nbsp; &nbsp; &nbsp; &lt;item&gt;@null&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp;&lt;/array&gt;<br/>
&nbsp;<br/>
24.android 4.2改launcher里面的icon横排的数目：<br/>
&lt;\packages\apps\Launcher2\res\values-sw720dp\config.xml&gt;<br/>
&lt;integer name="cell_count_x"&gt;7&lt;/integer&gt;<br/>
&nbsp;<br/>
如果改成7，hotseat里面第8个icon不见了，可以往第8个槽里面放进去，但是重启后，icon又不见了，可以这样修改：<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\LauncherModel.java&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; final ItemInfo occupied[][][] =<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; new ItemInfo[Launcher.SCREEN_COUNT + 1][mCellCountX + 2][mCellCountY + 1]; //原来这里是+1<br/>
&nbsp;<br/>
&nbsp;<br/>
&nbsp;<br/>
&nbsp;<br/>
25. 4.2 LockScreen 解锁界面四个方向添加一个setting入口<br/>
frameworks\base\core\res\res\values/arrays.xml<br/>
&nbsp; &nbsp; &lt;array name="lockscreen_targets_with_camera"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@drawable/ic_lockscreen_unlock&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@drawable/ic_action_assist_generic&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@drawable/ic_lockscreen_camera&lt;/item&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;@drawable/ic_lockscreen_settings&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/array&gt;<br/>
&nbsp;<br/>
在 frameworks\base\core\res\res\drawable 增加 ic_lockscreen_settings.xml 文件 并添加 ic_lockscreen_settings_normal.phg ic_lockscreen_settings_activated.png 资源文件<br/>
&nbsp;<br/>
&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;<br/>
&nbsp;<br/>
&nbsp;&lt;item<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_enabled="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_active="false"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_focused="false"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:drawable="@drawable/ic_lockscreen_settings_normal" /&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &lt;item<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_enabled="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_active="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_focused="false"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:drawable="@drawable/ic_lockscreen_settings_activated" /&gt;<br/>
&nbsp;<br/>
&nbsp; &nbsp; &lt;item<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_enabled="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_active="false"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:state_focused="true"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; android:drawable="@drawable/ic_lockscreen_settings_activated" /&gt;<br/>
&lt;/selector&gt;<br/>
<br/>
&nbsp;frameworks\base\policy\src\com\android\internal\policy\impl\LockScreen.java<br/>
&nbsp; &nbsp; &nbsp;public void onTrigger(View v, int target) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; final int resId = mGlowPadView.getResourceIdForTarget(target);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; switch (resId) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case com.android.internal.R.drawable.ic_lockscreen_settings: //启动setting 应用<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; launchActivity(new Intent().setComponent(new ComponentName("com.android.settings","com.android.settings.Settings"))); &nbsp; <br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mCallback.pokeWakelock();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br/>
&nbsp;<br/>
&nbsp;<br/>
&nbsp;<br/>
26. 4.2 上隐藏 Wifi Display <br/>
&nbsp; 去掉项目overlay/frameworks/base/core/res/res/config.xml 中的config_enableWifiDisplay <br/>
&nbsp;<br/>
27. 默认音量修改<br/>
frameworks/base/media/java/android/media/AudioService.java<br/>
private final int[] MAX_STREAM_VOLUME = new int[] {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 5, &nbsp;// STREAM_VOICE_CALL<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_SYSTEM<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_RING<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 15, // STREAM_MUSIC<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_ALARM<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_NOTIFICATION<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 15, // STREAM_BLUETOOTH_SCO<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_SYSTEM_ENFORCED<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 15, // STREAM_DTMF<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 15 &nbsp;// STREAM_TTS<br/>
&nbsp; &nbsp; };<br/>
&nbsp;<br/>
frameworks/base/media/java/android/media/AudioManager.java<br/>
&nbsp;<br/>
/** &nbsp;@hide Default volume index values for audio streams */<br/>
&nbsp; &nbsp; public static final int[] DEFAULT_STREAM_VOLUME = new int[] {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 4, &nbsp;// STREAM_VOICE_CALL<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_SYSTEM<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 5, &nbsp;// STREAM_RING<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 11, // STREAM_MUSIC<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 6, &nbsp;// STREAM_ALARM<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 5, &nbsp;// STREAM_NOTIFICATION<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_BLUETOOTH_SCO<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_SYSTEM_ENFORCED<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 11, // STREAM_DTMF<br/>
&nbsp; &nbsp; &nbsp; &nbsp; 11 &nbsp;// STREAM_TTS<br/>
&nbsp; &nbsp; };<br/>
&nbsp;<br/>
28.widget中隐藏google play：<br/>
&lt;\packages\apps\Launcher2\src\com\android\launcher2\AppsCustomizePagedView.java&gt;<br/>
updatePackages里面添加：<br/>
if(!widget.provider.getPackageName().equals("com.android.vending") &amp;&amp; !widget.provider.getPackageName().equals("com.android.vending.MarketWidgetProvider")){<br/>
&nbsp; &nbsp; mWidgets.add(widget);<br/>
}<br/>
&nbsp;<br/>
29.去掉设置--&gt;显示--&gt;亮度里的“自动调整亮度”选项<br/>
&lt;\packages\apps\Settings\res\layout\preference_dialog_brightness.xml&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;CheckBox android:id="@+id/automatic_mode"<br/>
加上<br/>
&nbsp; &nbsp; android:visibility="invisible"<br/>
&nbsp;<br/>
30.设置-位置信息访问权限默认关闭<br/>
&lt;\frameworks\base\packages\SettingsProvider\res\values\defaults.xml&gt;<br/>
&lt;string name="def_location_providers_allowed" translatable="false"&gt;&lt;/string&gt;<br/>
这里不要填写gps或者network，清空<br/>
&nbsp;<br/>
31.设置-安全-验证应用默认不勾允<br/>
&lt;\frameworks\base\packages\SettingsProvider\res\values\defaults.xml&gt;<br/>
&lt;bool name="def_package_verifier_enable"&gt;false&lt;/bool&gt;<br/>
&nbsp;<br/>
32.设置-声音-触摸提示音与锁屏提示音默认不勾允状态<br/>
&lt;\frameworks\base\packages\SettingsProvider\res\values\defaults.xml&gt;<br/>
&lt;integer name="def_lockscreen_sounds_enabled"&gt;0&lt;/integer&gt;<br/>
&lt;bool name="def_sound_effects_enabled"&gt;false&lt;/bool&gt;<br/>
&nbsp;<br/>
33.设置-以太网菜单请移动“更多”菜单下<br/>
请用附件ethernet.patch，开关是ro.ethernet.more，设置为true，ethernet移到more里面<br/>
在settings的git下打这个patch<br/>
&nbsp;<br/>
34.窗口小部件“指针时钟”显示不全<br/>
把clock的widget向上调，下面的值改小：<br/>
&lt;\packages\amlogic\Launcher2\res\values\dimens.xml&gt;<br/>
&lt;dimen name="app_widget_preview_padding_top"&gt;10dp&lt;/dimen&gt;<br/>
&nbsp;<br/>
35.去掉settings的more里面的网络共享与便携式热点<br/>
ro.tether.denied=true<br/>
&nbsp;<br/>
36.平台主界面底部工具栏上的图标全部居中显示，从左至右的图标依次为：vol-、back、home、窗口切换、vol+<br/>
1.在prop里面将ro.statusbar.volume设置为true<br/>
2.&lt;\frameworks\base\packages\SystemUI\res\layout-sw600dp\navigation_bar.xml&gt;<br/>
将<br/>
&lt;com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/sub"<br/>
……<br/>
/&gt;<br/>
这段放到<br/>
&lt;com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"<br/>
……<br/>
/&gt;<br/>
这段之前<br/>
&nbsp;<br/>
&lt;com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/add"<br/>
……<br/>
/&gt;<br/>
这段放到<br/>
&lt;com.android.systemui.statusbar.policy.KeyButtonView<br/>
android:id="@+id/recent_apps"<br/>
……<br/>
/&gt;<br/>
这段之后<br/>
&nbsp;<br/>
注意这个文件有两处需要调换上面的<br/>
&nbsp;<br/>
37.主界面模拟时钟改成数字时钟<br/>
default_workspace.xml里面加上：<br/>
&lt;appwidget<br/>
&nbsp; &nbsp; launcher:packageName="com.android.deskclock"<br/>
&nbsp; &nbsp; launcher:className="com.android.alarmclock.DigitalAppWidgetProvider"<br/>
&nbsp;<br/>
38、settings中的developer options的开关打开，debug关掉：<br/>
&lt;\frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java&gt;<br/>
&nbsp; &nbsp; private void loadSecureSettings(SQLiteDatabase db) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp;loadSetting(stmt, Settings.Secure.ADB_ENABLED, 0);<br/>
&nbsp; &nbsp; &nbsp; &nbsp;loadSetting(stmt, Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED, 1);<br/>
&nbsp;<br/>
39、改桌面icon行、列数：<br/>
&lt;\packages\apps\Launcher2\res\layout-sw***dp\workspace.xml&gt;<br/>
&nbsp; &nbsp; launcher:cellCountX="10"<br/>
&nbsp; &nbsp; launcher:cellCountY="6"<br/>
&nbsp;<br/>
40、more里面morebile data项默认不选：<br/>
1.&lt;\frameworks\base\packages\SettingsProvider\src\com\android\providers\settings\DatabaseHelper.java&gt;<br/>
&nbsp; &nbsp; private void loadSecureSettings(SQLiteDatabase db) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; SQLiteStatement stmt = null;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; try {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; stmt = db.compileStatement("INSERT OR IGNORE INTO secure(name,value)"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; + " VALUES(?,?);");<br/>
添加：<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loadIntegerSetting(stmt, Settings.Secure.MOBILE_DATA,<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; R.integer.def_mobile_data);<br/>
&nbsp;<br/>
2.&lt;\frameworks\base\packages\SettingsProvider\res\values\defaults.xml&gt;<br/>
&lt;integer name="def_mobile_data"&gt;0&lt;/integer&gt;<br/>
&nbsp;<br/>
41.secure的unknown的设置默认打开：<br/>
&lt;\frameworks\base\packages\SettingsProvider\res\values\defaults.xml&gt;<br/>
&nbsp; &nbsp;&lt;bool name="def_install_non_market_apps"&gt;true&lt;/bool&gt;<br/>
&nbsp;<br/>
42、修改app list的背景：<br/>
&lt;\packages\apps\Launcher2\res\layout\apps_customize_pane.xml&gt;<br/>
&lt;com.android.launcher2.AppsCustomizeTabHost<br/>
&nbsp; &nbsp; xmlns:android="http://schemas.android.com/apk/res/android"<br/>
&nbsp; &nbsp; xmlns:launcher="http://schemas.android.com/apk/res/c...droid.launcher"<br/>
&nbsp; &nbsp; android:background="@drawable/wallpaper_03"&gt;<br/>
&nbsp;<br/>
43、bluetooth tethering的checkbox去掉：<br/>
overlay里面的<br/>
&nbsp;&lt;\frameworks\base\core\res\res\values\config.xml&gt;<br/>
&nbsp; &nbsp; &nbsp;&lt;string-array translatable="false" name="config_tether_bluetooth_regexs"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &lt;item&gt;"bt-pan"&lt;/item&gt;<br/>
&nbsp; &nbsp; &lt;/string-array&gt; <br/>
去掉&lt;item&gt;"bt-pan"&lt;/item&gt;<br/>
&nbsp;<br/>
44. Google play 不是内置， 而是安装，导致出问题的解决办法<br/>
frameworks/baseservices/java/com/android/server/pm/PackageManagerService.java<br/>
@@ -4594,6 +4594,9 @@ public class PackageManagerService extends IPackageManager.Stub {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (pkg.packageName.equals("com.android.vending")){<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; allowed = true;<br/>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (!allowed &amp;&amp; (bp.protectionLevel<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp; PermissionInfo.PROTECTION_FLAG_DEVELOPMENT) != 0) {<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;// For development permissions, a development permission<br/>
<br/>
45.以太网设置问题<br/>
以太网在settings.db中的条目是"eth_on", 默认值由系统属性 ro.ethernet.default_on 决定，<br/>
ro.ethernet.default_on=false 默认关闭<br/>
ro.ethernet.default_on=true默认打开<br/>
不定义该属性默认关闭<br/>
&nbsp;<br/>
------------------------------------<br/>
<br/>
<br/>
项目接近尾声，今天恰好也要初始化一下系统里的默认值，google了一下，有时就得做个拿来主义，没有时才自己做轮子滴嘛，呵呵<br/>
<br/>
1开机图片:<br/>
　　android-logo-mask.png<br/>
　　android-logo-shine.png<br/>
　　这两个图片一个在上一个在下<br/>
　　./out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes/assets/images/android-logo-shine.png<br/>
　　./frameworks/base/core/res/assets/images/android-logo-shine.png<br/>
　　注意:如果源码没有make可以直接更改frameworks里的的图片就可以了<br/>
　　然后直接make否则必须全更改并且不能make只能make firmwar<br/>
<br/>
2默认开机墙纸的位置:<br/>
　　default_wallpaper.jpg<br/>
　　./out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes/res/drawable/default_wallpaper.jpg<br/>
　　./frameworks/base/core/res/res/drawable/default_wallpaper.jpg<br/>
　　注意:这个设置和上面的一样这俩个都不能更改文件名<br/>
　　3更改PC机器删除硬件的文字kernel中<br/>
　　drivers/usb/gadget/f_mass_storage.c<br/>
　　fsg-&gt;vendor = "XXXXXXXXXXXXX";<br/>
<br/>
4更改卷标:<br/>
　　bootable/recovery/etc/init.rc<br/>
　　setprop UserVolumeLabel "XXXXXXXXXXXXX"<br/>
　　直接打包<br/>
<br/>
5修改屏幕锁:<br/>
　　(1)<br/>
　　frameworks/base/packages/SettingsProvider/res/values/defaults.xml<br/>
　　&lt;integer name="def_screen_off_timeout"&gt;60000&lt;/integer&gt;<br/>
　　60000改成想要的时间如果是不锁为-1<br/>
　　(2)<br/>
　　frameworks/policies/base/phone/com/android/internal/policy/impl/KeyguardViewMediator.java<br/>
　　private boolean mExternallyEnabled = true;<br/>
　　将其修改成false<br/>
　　这样更改就不会再进入休眠状态了<br/>
<br/>
6初始化语言:<br/>
　　参考下篇文章<br/>
<br/>
7设定初始化主页:<br/>
　　package/app/Browser/res/values/String.xml<br/>
　　655行<br/>
　　后面的应该是书签里的　　<br/>
<br/>
8设定亮度0~255:<br/>
　　frameworks/base/packages/SettingsProvider/res/values/defaults.xml <br/>
　　def_screen_brightness--&gt;这个值初始化好像是100多<br/>
<br/>
9音量:<br/>
　　frameworks/base/media/java/android/media/AudioManager.java<br/>
　　数组DEFAULT_STREAM_VOLUME第4个值(最大我设置到30但是还是差2格才到最大--默认是11<br/>
　　建议将数组里的所有的数值都设为最大就OK了)<br/>
　　mm frameworks/base<br/>
<br/>
&nbsp; &nbsp; &nbsp; &nbsp;AudioService.java中定义了每一种音频流的最大音量级别：<br/>
[java] view plaincopy<br/>
<br/>
&nbsp; &nbsp; /** @hide Maximum volume index values for audio streams */ &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; private int[] MAX_STREAM_VOLUME = new int[] { &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5, &nbsp;// STREAM_VOICE_CALL &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_SYSTEM &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_RING &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15, // STREAM_MUSIC &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_ALARM &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_NOTIFICATION &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15, // STREAM_BLUETOOTH_SCO &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 7, &nbsp;// STREAM_SYSTEM_ENFORCED &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15, // STREAM_DTMF &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15 &nbsp;// STREAM_TTS &nbsp; &nbsp;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp;<br/>
<br/>
<br/>
10设置Google帐户，左上角提示“正在设置RK2818SDK”，要求改成“正在设置W9”:<br/>
　　out\target\product\sdkDemo\root 中default.prop文件第13行<br/>
&nbsp; &nbsp; &nbsp; ro.product.model=rk2818sdk &nbsp;改为 ro.product.model=W9<br/>
<br/>
11录音没有小时显示。要求增加:<br/>
　　 packages\apps\SoundRecorder\src\com\android\soundrecorder<br/>
&nbsp; &nbsp; &nbsp; （1）SoundRecorder.java中： private void updateTimerView() <br/>
&nbsp; &nbsp; 　　 把 String timeStr = String.format(mTimerFormat, time/60, time%60); &nbsp; &nbsp; &nbsp; &nbsp;<br/>
&nbsp; &nbsp; 　　 改为：long hour=time/3600;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String timeStr = String.format(mTimerFormat, hour, (time-hour*3600)/60, time%60); <br/>
&nbsp; &nbsp; &nbsp; (2) &nbsp;\res\values中strings.xml改为：<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;string name="timer_format"&gt;&lt;xliff:g id="format"&gt;%02d:%02d:%02d&lt;/xliff:g&gt;&lt;/string&gt;<br/>
<br/>
12去掉Bluetooth:<br/>
　　　　　　(主界面-&gt;添加文件夹-&gt;Bluetooth received)<br/>
　　　　　　 ic_launcher_folder_bluetooth.png（72*72）:<br/>
　　　　　　 &nbsp;在\packages\apps\Bluetooth\res\drawable-hdpi<br/>
&nbsp; 　　　　　　解决方法：删除\out\target\product\sdkDemo\system\app下的Bluetooth.apk<br/>
<br/>
13充电锁屏时图片：<br/>
　　　　　　frameworks\base\core\res\res\drawable-hdpi:ic_lock_idle_charging.png<br/>
<br/>
14去掉锁屏时显示充电百分比在：<br/>
　　　　　　frameworks\base\core\res\res\values-zh-rCN中strings.xml 的lockscreen_plugged_in 括号中的内容及括号 !!<br/>
<br/>
15去掉动态桌面背景选项：<br/>
　　　　　　packages\wallpapers\Basic 中AndroidManifest.xml的&lt;service&gt;这些，如星系注释掉如下这些：<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;service<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:label="@string/wallpaper_galaxy"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:name="com.android.wallpaper.galaxy.GalaxyWallpaper"<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;android:permission="android.permission.BIND_WALLPAPER"&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;intent-filter&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;action android:name="android.service.wallpaper.WallpaperService" /&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/intent-filter&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;meta-data android:name="android.service.wallpaper" android:resource="@xml/galaxy" /&gt;<br/>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/srvice&gt;<br/>
<br/>
16更改版本号:<br/>
　　　　build/core/Makefile <br/>
　　　　79行<br/>
　　　　RK_VER := xxx<br/>
17更改界面布局<br/>
　　位置:package/app/Launcher2/res/xml/default_workspace.xml<br/>
　　注意:adb shell 里当你点击任意的一个apk的时候,在后台会输出<br/>
　　I/ActivityManager( &nbsp;728): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 　　 　cmp=com.estrongs.android.pop/.view.FileExplorerActivity bnds=[294,373][393,478] }<br/>
I/WindowManager( &nbsp;728): Setting rotation to 1, animFlags=0<br/>
&nbsp; &nbsp; &nbsp; 看蓝色的部分就可以找到/前是包名/后面是类名--&gt;这个是在default_workspace.xml里面需要用到的<br/>
　　launcher:packageName="com.android.browser" &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br/>
&nbsp; &nbsp; &nbsp; launcher:className="com.android.browser.BrowserActivity"<br/>
18如何将pdf类的文件放到桌面上<br/>
　　客户要求将他们自己制作的pdf帮助文档放置到桌面上使客人可以直接点击就浏览<br/>
　　 &nbsp;String urlString = "/system/app/Nvsbl P4Dv2 English Manual.pdf";<br/>
&nbsp; &nbsp; &nbsp; &nbsp; Intent intent = new Intent();<br/>
&nbsp; &nbsp; &nbsp; &nbsp; intent.setAction(android.content.Intent.ACTION_VIEW);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; intent.setDataAndType(Uri.fromFile(new File(urlString)),"application/pdf");<br/>
&nbsp; &nbsp; &nbsp; &nbsp; startActivity(intent);<br/>
&nbsp; &nbsp; &nbsp; &nbsp; finish();<br/>
　　　解释下:<br/>
　　　首先将pdf文档放到out/target/product/sdkDemo/system/app下<br/>
　　　将固定地址给出urlString,使用Intent<br/>
　　　intent.setAction(android.content.Intent.ACTION_VIEW);启动View<br/>
　　　intent.setDataAndType(Uri.fromFile(new File(urlString)),"application/pdf");　　　<br/>
　　　application/pdf可以指定别的格式包括音频,视频,图片等等但是没有试过有需要可以试试<br/>
　　　注意:这个方法很不到如果只放置一些图片还可以但是如果放置文件比较大那么打包出来的<br/>
　　　system.img文件会很大也就是占用本身的系统内存-----&gt;所以不推荐使用!!!!!!!!!!!<br/>
19.发现PIN解锁界面出现5秒之后就会自动进入睡眠，之后将无法再次解锁。目前解决方法：<br/>
&nbsp; 修改文件 frameworks\policies\base\phone\com\android\internal\policy\impl\KeyguardViewMediator.java<br/>
<br/>
将如下这行：<br/>
protected static final int AWAKE_INTERVAL_DEFAULT_MS = 5000;<br/>
修改为：<br/>
protected static final int AWAKE_INTERVAL_DEFAULT_MS = 1000 * 60 * 5; </body></html>